home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ian & Stuart's Australian Mac: Not for Sale
/
Another.not.for.sale (Australia).iso
/
fade into you
/
getting there
/
WWW
/
MacHTTP Extras
/
Script Tools
/
Examples
/
File IO Example II
< prev
next >
Wrap
Text File
|
1993-07-08
|
383b
|
22 lines
--
-- Let the user pick a file to read
--
set newFile to choose file with prompt "Pick a file to read:" of type {"TEXT"}
--
-- Open the file and read through it
--
set refNum to open file newFile for reading
try
repeat
set input to read file refNum
display dialog input buttons {"OK"} default button "OK"
end repeat
on error
--
-- Assume EOF
--
close file refNum
end try